﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    
    xmlns:commonCtrl="clr-namespace:Tum.PDE.ToolFramework.Modeling.Visualization.Controls.Common;assembly=Tum.PDE.ToolFramework.Modeling.Visualization"
    xmlns:shellCommonCtrl="clr-namespace:Tum.PDE.ToolFramework.Modeling.Visualization.Shell.Controls.Common">

    <Style TargetType="{x:Type shellCommonCtrl:ShellTabControlAvalonDock}" BasedOn="{StaticResource {x:Type commonCtrl:TabControlAvalonDock}}">
        <Setter Property="ActivatedCommand" Value="{Binding Path=PackageController.LayoutManager.DocumentPaneControlActivated, Mode=OneTime}"/>
        <Setter Property="TriggerActivatedCommand" Value="{Binding Path=TriggerDockingPaneActivated, Mode=OneWay}"/>
        <Setter Property="CloseCurrentTabComand" Value="{Binding Path=PackageController.LayoutManager.CloseSelectedDocumentPaneCommand, Mode=OneTime}"/>
        <Setter Property="ItemsSource" Value="{Binding Path=VisibleDocumentPanes, Mode=OneWay}"/>
        <Setter Property="SelectedItem" Value="{Binding Path=SelectedDocumentPane, Mode=TwoWay}"/>
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <Style TargetType="{x:Type commonCtrl:TabItemAvalonDock}">
                    <Setter Property="Title" Value="{Binding Path=DockingPaneTitle, Mode=OneWay}"/>
                    <Setter Property="ImageSource" Value="{Binding Path=DockingPaneImageUri, Mode=OneWay}"/>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemTemplate">
            <Setter.Value>
                <DataTemplate>
                    <ContentControl Content="{Binding Path=.}"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
